import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

import javax.imageio.ImageIO;

import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.Test;

import com.fish.manni.FrameTest;
import com.fish.manni.ImageUtil;

import net.sourceforge.tess4j.TesseractException;

public class mantest {
    public static void main(String[] args) throws IOException, TesseractException {
        // FrameTest frameTest = new FrameTest();
        // BufferedImage image = ImageIO.read(new File("D:\\screenshotb5333567-fe2f-4496-a890-2372013b42ea.png"));
        // String s = frameTest.shibie(image);
        // System.out.println(s);
        String aString = "abc";
        System.out.println(aString.substring(0,1));
    }
    
    @Test
    public void ssssssss2() throws IOException{
        File f = new File("D:\\c5c6651f-3a76-4e33-b850-05ad9ad1a5da.png");

        FileOutputStream baos = new FileOutputStream(new File("D://a.png"));
        BufferedImage sss = ImageIO.read(f);
        sss = ImageUtil.convertToGrayscale(sss);
        ImageIO.write(sss, "png", baos);
        // ImageIO.rel
    }
    @Test
    public void ssssssss(){
        String s = ImageUtil.token();
        System.out.println(s);
        String ssss = ImageUtil.convertImageToBase64Str(new File("D:\\screenshotb5333567-fe2f-4496-a890-2372013b42ea.png"));
        System.out.println(ssss);
        String  res = ImageUtil.shibieshuzi(ssss);
        System.out.println(res);
    }
}
